package com.itheima.String;

import java.util.Scanner;

public class Test4 {
    public static void main(String[] args) {
        //1.键盘录入一个字符串,用Scanner实现
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入手机号:");
        String telString = sc.nextLine();
        //2.截取字符串前三位
        String start = telString.substring(0, 3);
        //3.截取字符串后四位
        String end = telString.substring(telString.length() - 4);
        //4.将截取后的两个字符串,中间加上****进行拼接.输出结果
        System.out.println(start + "****" + end);
    }
}
